<template>
  <div>
    {{ name }}
    <br />
    <Child></Child>
  </div>
</template>

<!-- 顶层编写方式 -->
<script setup>
import { ref } from 'vue'
import Child from './Child'
const name = ref('code')
</script>
<!-- <script>
import { ref } from 'vue'
import Child from './Child.vue'
export default {
  components: {
    Child,
  },
  setup() {
    const name = ref('code')
    return {
      name,
    }
  },
}
</script> -->

<style
  lang="scss"
  scoped
></style>
